package cn.youyu.fm.dao;

import cn.youyu.fm.domain.User;
import cn.youyu.fm.mapper.UserMapper;
import org.springframework.stereotype.Repository;

/**
 * @author: mayuanbao
 * @date: 2018-12-01 14:30
 * @description:
 */
@Repository(value = "userDao")
public class UserDaoJdbc extends BaseDao implements IUserDao {
    @Override
    public User getUser(String name) {
        return getSqlSession().getMapper(UserMapper.class).getUser(name);
    }

    @Override
    public int save(User user) {
        return getSqlSession().getMapper(UserMapper.class).insertUser(user);
    }
}
